{
"": "Map",
"Analysis": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Map"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Map"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Declaration"
}
}
],
"source": {
"type": "Literal",
"value": "./Declaration"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Analysis"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "declarations"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Analysis"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Analysis"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "declarations"
},
"value": {
"type": "Identifier",
"name": "declarations"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "declarations"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "isMap"
}
},
"arguments": [
{
"type": "Identifier",
"name": "declarations"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "declarations is not a Map: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "declarations"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "declarations"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "declarations"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "declarations?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Analysis"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isAnalysis"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Analysis"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isAnalysis"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Analysis"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Analysis"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Analysis"
}
}
]
},
"ArrayExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ArrayExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "elements"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ArrayExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ArrayExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "elements"
},
"value": {
"type": "Identifier",
"name": "elements"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "elements"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "elements"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "elements is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "elements"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "elements"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "elements"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "elements?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ArrayExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isArrayExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ArrayExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isArrayExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ArrayExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ArrayExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ArrayExpression"
}
}
]
},
"ArrayPattern": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "ArrayExpression"
}
}
],
"source": {
"type": "Literal",
"value": "./ArrayExpression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ArrayPattern"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "ArrayExpression"
},
"property": {
"type": "Identifier",
"name": "ArrayExpression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "elements"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ArrayPattern"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ArrayPattern"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "ArrayExpression"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "elements"
},
"value": {
"type": "Identifier",
"name": "elements"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "elements"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "elements"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "elements is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "elements"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "elements"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "elements"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "elements?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ArrayPattern"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isArrayPattern"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ArrayPattern"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isArrayPattern"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ArrayPattern"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ArrayPattern"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ArrayPattern"
}
}
]
},
"Assembly": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Map"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Map"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Module"
}
}
],
"source": {
"type": "Literal",
"value": "./Module"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Assembly"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "modules"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Module"
},
"property": {
"type": "Identifier",
"name": "Module"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Assembly"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Assembly"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "modules"
},
"value": {
"type": "Identifier",
"name": "modules"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "modules"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Module"
},
"property": {
"type": "Identifier",
"name": "Module"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "isMap"
}
},
"arguments": [
{
"type": "Identifier",
"name": "modules"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "modules is not a Map: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "modules"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "modules"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "modules"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "modules?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Module"
},
"property": {
"type": "Identifier",
"name": "Module"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Assembly"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isAssembly"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Assembly"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isAssembly"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Assembly"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Assembly"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Assembly"
}
}
]
},
"AssignmentStatement": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Statement"
}
}
],
"source": {
"type": "Literal",
"value": "./Statement"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "AssignmentStatement"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Statement"
},
"property": {
"type": "Identifier",
"name": "Statement"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "left"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "right"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "AssignmentStatement"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "AssignmentStatement"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Statement"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "left"
},
"value": {
"type": "Identifier",
"name": "left"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "right"
},
"value": {
"type": "Identifier",
"name": "right"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "left"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "right"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "left"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "left is not a Reference: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "left"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "right"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "right is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "right"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "left"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "left"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "right"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "right"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "left?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "right?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "AssignmentStatement"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isAssignmentStatement"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "AssignmentStatement"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isAssignmentStatement"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "AssignmentStatement"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "AssignmentStatement"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "AssignmentStatement"
}
}
]
},
"BinaryExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "BinaryExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "left"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "operator"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "right"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "BinaryExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "BinaryExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "left"
},
"value": {
"type": "Identifier",
"name": "left"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "operator"
},
"value": {
"type": "Identifier",
"name": "operator"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "right"
},
"value": {
"type": "Identifier",
"name": "right"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "left"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "operator"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "right"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "left"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "left is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "left"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "isString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "operator"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "operator is not a String: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "operator"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "right"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "right is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "right"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "left"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "left"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "operator"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "operator"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "right"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "right"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "left?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "operator?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "right?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "BinaryExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isBinaryExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "BinaryExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isBinaryExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "BinaryExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "BinaryExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "BinaryExpression"
}
}
]
},
"BlockStatement": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Statement"
}
}
],
"source": {
"type": "Literal",
"value": "./Statement"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Scope"
}
}
],
"source": {
"type": "Literal",
"value": "./Scope"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "BlockStatement"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Statement"
},
"property": {
"type": "Identifier",
"name": "Statement"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Scope"
},
"property": {
"type": "Identifier",
"name": "Scope"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "statements"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Statement"
},
"property": {
"type": "Identifier",
"name": "Statement"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "BlockStatement"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "BlockStatement"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Statement"
},
{
"type": "Literal",
"value": "Scope"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "statements"
},
"value": {
"type": "Identifier",
"name": "statements"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "statements"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Statement"
},
"property": {
"type": "Identifier",
"name": "Statement"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "statements"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "statements is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "statements"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "statements"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "statements"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "statements?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Statement"
},
"property": {
"type": "Identifier",
"name": "Statement"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "BlockStatement"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isBlockStatement"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "BlockStatement"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isBlockStatement"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "BlockStatement"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "BlockStatement"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "BlockStatement"
}
}
]
},
"CallExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Property"
}
}
],
"source": {
"type": "Literal",
"value": "./Property"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "CallExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "callee"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "arguments"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Property"
},
"property": {
"type": "Identifier",
"name": "Property"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "CallExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "CallExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "callee"
},
"value": {
"type": "Identifier",
"name": "callee"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": false,
"key": {
"type": "Identifier",
"name": "arguments"
},
"value": {
"type": "Identifier",
"name": "_arguments"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "callee"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "arguments"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Property"
},
"property": {
"type": "Identifier",
"name": "Property"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "callee"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "callee is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "callee"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_arguments"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "arguments is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_arguments"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "callee"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "callee"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "arguments"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "_arguments"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "callee?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "arguments?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Property"
},
"property": {
"type": "Identifier",
"name": "Property"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "CallExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isCallExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "CallExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isCallExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "CallExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "CallExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "CallExpression"
}
}
]
},
"ClassDeclaration": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Declaration"
}
}
],
"source": {
"type": "Literal",
"value": "./Declaration"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Boolean"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Boolean"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Parameter"
}
}
],
"source": {
"type": "Literal",
"value": "./Parameter"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Map"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Map"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "KeyValuePair"
}
}
],
"source": {
"type": "Literal",
"value": "./KeyValuePair"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeExpression"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeExpression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ClassDeclaration"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "export"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "assignable"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "isStructure"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "parameters"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "baseClasses"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "declarations"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "static"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "meta"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "KeyValuePair"
},
"property": {
"type": "Identifier",
"name": "KeyValuePair"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "instanceType"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeExpression"
},
"property": {
"type": "Identifier",
"name": "TypeExpression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ClassDeclaration"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ClassDeclaration"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Declaration"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "Identifier",
"name": "id"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": false,
"key": {
"type": "Identifier",
"name": "export"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "_export"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "assignable"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "assignable"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "isStructure"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "isStructure"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "parameters"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "parameters"
},
"right": {
"type": "ArrayExpression",
"elements": []
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "baseClasses"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "baseClasses"
},
"right": {
"type": "ArrayExpression",
"elements": []
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "declarations"
},
"value": {
"type": "Identifier",
"name": "declarations"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": false,
"key": {
"type": "Identifier",
"name": "static"
},
"value": {
"type": "Identifier",
"name": "_static"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "meta"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "meta"
},
"right": {
"type": "ArrayExpression",
"elements": []
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "instanceType"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "instanceType"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "isStructure?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "parameters?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "baseClasses?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "declarations"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "static"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "meta?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "KeyValuePair"
},
"property": {
"type": "Identifier",
"name": "KeyValuePair"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "instanceType?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeExpression"
},
"property": {
"type": "Identifier",
"name": "TypeExpression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "id is not a Id: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "export is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "assignable is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "isStructure"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "isStructure is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "isStructure"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "parameters"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "parameters is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "parameters"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "baseClasses"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "baseClasses is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "baseClasses"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "isMap"
}
},
"arguments": [
{
"type": "Identifier",
"name": "declarations"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "declarations is not a Map: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "declarations"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "isMap"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_static"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "static is not a Map: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_static"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "meta"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "meta is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "meta"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeExpression"
},
"property": {
"type": "Identifier",
"name": "isTypeExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "instanceType"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "instanceType"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "instanceType is not a TypeExpression | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "instanceType"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "id"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "id"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "export"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "_export"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "assignable"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "assignable"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "isStructure"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "isStructure"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "parameters"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "parameters"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "baseClasses"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "baseClasses"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "declarations"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "declarations"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "static"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "_static"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "meta"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "meta"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "instanceType"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "instanceType"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "isStructure?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "parameters?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "baseClasses?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "declarations?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "static?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "meta?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "KeyValuePair"
},
"property": {
"type": "Identifier",
"name": "KeyValuePair"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "instanceType?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeExpression"
},
"property": {
"type": "Identifier",
"name": "TypeExpression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ClassDeclaration"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isClassDeclaration"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ClassDeclaration"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isClassDeclaration"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ClassDeclaration"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ClassDeclaration"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ClassDeclaration"
}
}
]
},
"ConditionalDeclaration": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "VariableDeclaration"
}
}
],
"source": {
"type": "Literal",
"value": "./VariableDeclaration"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Variable"
}
}
],
"source": {
"type": "Literal",
"value": "./Variable"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Declaration"
}
}
],
"source": {
"type": "Literal",
"value": "./Declaration"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Boolean"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Boolean"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ConditionalDeclaration"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "VariableDeclaration"
},
"property": {
"type": "Identifier",
"name": "VariableDeclaration"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Variable"
},
"property": {
"type": "Identifier",
"name": "Variable"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "assignable"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "export"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "virtual"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "negate"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ConditionalDeclaration"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ConditionalDeclaration"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "VariableDeclaration"
},
{
"type": "Literal",
"value": "Variable"
},
{
"type": "Literal",
"value": "Declaration"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "Identifier",
"name": "id"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "value"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "assignable"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "assignable"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": false,
"key": {
"type": "Identifier",
"name": "export"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "_export"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "virtual"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "virtual"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "negate"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "negate"
},
"right": {
"type": "Literal",
"value": false
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "virtual?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "negate?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "id is not a Id: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a Expression | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "assignable is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "export is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "virtual"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "virtual is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "virtual"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "negate"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "negate is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "negate"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "id"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "id"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "assignable"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "assignable"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "export"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "_export"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "virtual"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "virtual"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "negate"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "negate"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "virtual?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "negate?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ConditionalDeclaration"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isConditionalDeclaration"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ConditionalDeclaration"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isConditionalDeclaration"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ConditionalDeclaration"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ConditionalDeclaration"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ConditionalDeclaration"
}
}
]
},
"ConditionalExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ConditionalExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "test"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "consequent"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "alternate"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ConditionalExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ConditionalExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "test"
},
"value": {
"type": "Identifier",
"name": "test"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "consequent"
},
"value": {
"type": "Identifier",
"name": "consequent"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "alternate"
},
"value": {
"type": "Identifier",
"name": "alternate"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "test"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "consequent"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "alternate"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "test"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "test is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "test"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "consequent"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "consequent is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "consequent"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "alternate"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "alternate is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "alternate"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "test"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "test"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "consequent"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "consequent"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "alternate"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "alternate"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "test?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "consequent?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "alternate?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ConditionalExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isConditionalExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ConditionalExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isConditionalExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ConditionalExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ConditionalExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ConditionalExpression"
}
}
]
},
"Declaration": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Boolean"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Boolean"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Declaration"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "export"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "assignable"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Declaration"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Declaration"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "Identifier",
"name": "id"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": false,
"key": {
"type": "Identifier",
"name": "export"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "_export"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "assignable"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "assignable"
},
"right": {
"type": "Literal",
"value": false
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "id is not a Id: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "export is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "assignable is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "id"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "id"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "export"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "_export"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "assignable"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "assignable"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Declaration"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isDeclaration"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Declaration"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isDeclaration"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Declaration"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Declaration"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Declaration"
}
}
]
},
"DotExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "DotExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "name"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "DotExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "DotExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Reference"
},
{
"type": "Literal",
"value": "Id"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Node"
},
{
"type": "Literal",
"value": "Typed"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "name"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "name"
},
"right": {
"type": "Literal",
"value": "."
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "name?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "isString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "name"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "name is not a String: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "name"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "name"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "name"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "name?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "DotExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isDotExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "DotExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isDotExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "DotExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "DotExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "DotExpression"
}
}
]
},
"Expression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Expression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Expression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Expression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Expression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Expression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Expression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Expression"
}
}
]
},
"ExpressionStatement": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Statement"
}
}
],
"source": {
"type": "Literal",
"value": "./Statement"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ExpressionStatement"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Statement"
},
"property": {
"type": "Identifier",
"name": "Statement"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ExpressionStatement"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ExpressionStatement"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Statement"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "Identifier",
"name": "value"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ExpressionStatement"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isExpressionStatement"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ExpressionStatement"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isExpressionStatement"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ExpressionStatement"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ExpressionStatement"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ExpressionStatement"
}
}
]
},
"FunctionExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Scope"
}
}
],
"source": {
"type": "Literal",
"value": "./Scope"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Parameter"
}
}
],
"source": {
"type": "Literal",
"value": "./Parameter"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "BlockStatement"
}
}
],
"source": {
"type": "Literal",
"value": "./BlockStatement"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "FunctionExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Scope"
},
"property": {
"type": "Identifier",
"name": "Scope"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "parameters"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "returnType"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "body"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "typeGuard"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "FunctionExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "FunctionExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Scope"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "id"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "parameters"
},
"value": {
"type": "Identifier",
"name": "parameters"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "returnType"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "returnType"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "body"
},
"value": {
"type": "Identifier",
"name": "body"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "typeGuard"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "typeGuard"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "parameters"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "returnType?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "body"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "typeGuard?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "id is not a Id | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "parameters"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "parameters is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "parameters"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "returnType"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "returnType"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "returnType is not a Expression | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "returnType"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "isBlockStatement"
}
},
"arguments": [
{
"type": "Identifier",
"name": "body"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "body is not a BlockStatement: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "body"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "typeGuard"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "typeGuard"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "typeGuard is not a Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "typeGuard"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "id"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "id"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "parameters"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "parameters"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "returnType"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "returnType"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "body"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "body"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "typeGuard"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "typeGuard"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "parameters?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "returnType?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "body?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "typeGuard?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "FunctionExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isFunctionExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "FunctionExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isFunctionExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "FunctionExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "FunctionExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "FunctionExpression"
}
}
]
},
"FunctionType": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Parameter"
}
}
],
"source": {
"type": "Literal",
"value": "./Parameter"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "FunctionType"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "parameters"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "returnType"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "FunctionType"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "FunctionType"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "TypeDefinition"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "parameters"
},
"value": {
"type": "Identifier",
"name": "parameters"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "returnType"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "returnType"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "parameters"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "returnType?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "parameters"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "parameters is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "parameters"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "returnType"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "returnType"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "returnType is not a Expression | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "returnType"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "parameters"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "parameters"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "returnType"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "returnType"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "parameters?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "returnType?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "FunctionType"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isFunctionType"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "FunctionType"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isFunctionType"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "FunctionType"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "FunctionType"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "FunctionType"
}
}
]
},
"Id": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Id"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "name"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Id"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Id"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "name"
},
"value": {
"type": "Identifier",
"name": "name"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "name"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "isString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "name"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "name is not a String: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "name"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "name"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "name"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "name?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Id"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isId"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Id"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isId"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Id"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Id"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Id"
}
}
]
},
"IfStatement": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Statement"
}
}
],
"source": {
"type": "Literal",
"value": "./Statement"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "BlockStatement"
}
}
],
"source": {
"type": "Literal",
"value": "./BlockStatement"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "IfStatement"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Statement"
},
"property": {
"type": "Identifier",
"name": "Statement"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "test"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "consequent"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "alternate"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "IfStatement"
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "IfStatement"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "IfStatement"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Statement"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "test"
},
"value": {
"type": "Identifier",
"name": "test"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "consequent"
},
"value": {
"type": "Identifier",
"name": "consequent"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "alternate"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "alternate"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "test"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "consequent"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "alternate?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "IfStatement"
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "test"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "test is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "test"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "isBlockStatement"
}
},
"arguments": [
{
"type": "Identifier",
"name": "consequent"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "consequent is not a BlockStatement: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "consequent"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "isBlockStatement"
}
},
"arguments": [
{
"type": "Identifier",
"name": "alternate"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isIfStatement"
},
"arguments": [
{
"type": "Identifier",
"name": "alternate"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "alternate"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "alternate is not a BlockStatement | IfStatement | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "alternate"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "test"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "test"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "consequent"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "consequent"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "alternate"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "alternate"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "test?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "consequent?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "alternate?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "IfStatement"
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "IfStatement"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isIfStatement"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "IfStatement"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isIfStatement"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "IfStatement"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "IfStatement"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "IfStatement"
}
}
]
},
"ImportDeclaration": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Declaration"
}
}
],
"source": {
"type": "Literal",
"value": "./Declaration"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Boolean"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Boolean"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ImportDeclaration"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "export"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "assignable"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "from"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ImportDeclaration"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ImportDeclaration"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Declaration"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "Identifier",
"name": "id"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": false,
"key": {
"type": "Identifier",
"name": "export"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "_export"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "assignable"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "assignable"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "from"
},
"value": {
"type": "Identifier",
"name": "from"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "from"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "id is not a Id: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "export is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "assignable is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "isString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "from"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "from is not a String: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "from"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "id"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "id"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "export"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "_export"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "assignable"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "assignable"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "from"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "from"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "from?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ImportDeclaration"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isImportDeclaration"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ImportDeclaration"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isImportDeclaration"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ImportDeclaration"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ImportDeclaration"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ImportDeclaration"
}
}
]
},
"ImportStep": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Boolean"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Boolean"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ImportStep"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "relative"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "as"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "children"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "Identifier",
"name": "ImportStep"
}
]
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ImportStep"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ImportStep"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "relative"
},
"value": {
"type": "Identifier",
"name": "relative"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "id"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "as"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "as"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "children"
},
"value": {
"type": "Identifier",
"name": "children"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "relative"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "as?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "children"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "Identifier",
"name": "ImportStep"
}
]
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "relative"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "relative is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "relative"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "id is not a Id | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "as"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "as"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "as is not a Id | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "as"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "children"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "children"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "children is not a Array | Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "children"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "relative"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "relative"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "id"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "id"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "as"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "as"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "children"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "children"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "relative?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "as?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "children?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "Identifier",
"name": "ImportStep"
}
]
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ImportStep"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isImportStep"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ImportStep"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isImportStep"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ImportStep"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ImportStep"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ImportStep"
}
}
]
},
"KeyValuePair": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "KeyValuePair"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "key"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "KeyValuePair"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "KeyValuePair"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "key"
},
"value": {
"type": "Identifier",
"name": "key"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "Identifier",
"name": "value"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "key"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "key"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "key"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "key is not a Expression | Id: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "key"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "key"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "key"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "key?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "KeyValuePair"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isKeyValuePair"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "KeyValuePair"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isKeyValuePair"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "KeyValuePair"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "KeyValuePair"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "KeyValuePair"
}
}
]
},
"Literal": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Number"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Number"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Boolean"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Boolean"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Literal"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Number"
},
"property": {
"type": "Identifier",
"name": "Number"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Literal"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Literal"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "Identifier",
"name": "value"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Number"
},
"property": {
"type": "Identifier",
"name": "Number"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "isString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Number"
},
"property": {
"type": "Identifier",
"name": "isNumber"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a String | Number | Boolean | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Number"
},
"property": {
"type": "Identifier",
"name": "Number"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Literal"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isLiteral"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Literal"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isLiteral"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Literal"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Literal"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Literal"
}
}
]
},
"Location": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Position"
}
}
],
"source": {
"type": "Literal",
"value": "./Position"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Location"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "start"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Position"
},
"property": {
"type": "Identifier",
"name": "Position"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "end"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Position"
},
"property": {
"type": "Identifier",
"name": "Position"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "filename"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Location"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Location"
},
{
"type": "Literal",
"value": "ion_Object"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "start"
},
"value": {
"type": "Identifier",
"name": "start"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "end"
},
"value": {
"type": "Identifier",
"name": "end"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "filename"
},
"value": {
"type": "Identifier",
"name": "filename"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "start"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Position"
},
"property": {
"type": "Identifier",
"name": "Position"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "end"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Position"
},
"property": {
"type": "Identifier",
"name": "Position"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "filename"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Position"
},
"property": {
"type": "Identifier",
"name": "isPosition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "start"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "start is not a Position: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "start"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Position"
},
"property": {
"type": "Identifier",
"name": "isPosition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "end"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "end is not a Position: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "end"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "isString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "filename"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "filename is not a String: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "filename"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "start"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "start"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "end"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "end"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "filename"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "filename"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "start?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Position"
},
"property": {
"type": "Identifier",
"name": "Position"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "end?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Position"
},
"property": {
"type": "Identifier",
"name": "Position"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "filename?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Location"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isLocation"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Location"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isLocation"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Location"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Location"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Location"
}
}
]
},
"MemberExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "MemberExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "object"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "property"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "MemberExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "MemberExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "object"
},
"value": {
"type": "Identifier",
"name": "object"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "property"
},
"value": {
"type": "Identifier",
"name": "property"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "object"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "property"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "object"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "object is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "object"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "property"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "property"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "property is not a Id | Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "property"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "object"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "object"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "property"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "property"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "object?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "property?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "MemberExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isMemberExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "MemberExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isMemberExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "MemberExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "MemberExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "MemberExpression"
}
}
]
},
"Module": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Scope"
}
}
],
"source": {
"type": "Literal",
"value": "./Scope"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "ImportStep"
}
}
],
"source": {
"type": "Literal",
"value": "./ImportStep"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Declaration"
}
}
],
"source": {
"type": "Literal",
"value": "./Declaration"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Module"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Scope"
},
"property": {
"type": "Identifier",
"name": "Scope"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "imports"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "ImportStep"
},
"property": {
"type": "Identifier",
"name": "ImportStep"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "declarations"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Module"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Module"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Scope"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "imports"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "imports"
},
"right": {
"type": "ArrayExpression",
"elements": []
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "declarations"
},
"value": {
"type": "Identifier",
"name": "declarations"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "imports?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "ImportStep"
},
"property": {
"type": "Identifier",
"name": "ImportStep"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "declarations"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "imports"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "imports is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "imports"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "declarations"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "declarations is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "declarations"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "imports"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "imports"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "declarations"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "declarations"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "imports?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "ImportStep"
},
"property": {
"type": "Identifier",
"name": "ImportStep"
}
}
]
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "declarations?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Module"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isModule"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Module"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isModule"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Module"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Module"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Module"
}
}
]
},
"Node": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Node"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Node"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Node"
},
{
"type": "Literal",
"value": "ion_Object"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Node"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isNode"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Node"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isNode"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Node"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Node"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Node"
}
}
]
},
"ObjectExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Property"
}
}
],
"source": {
"type": "Literal",
"value": "./Property"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ObjectExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "properties"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Property"
},
"property": {
"type": "Identifier",
"name": "Property"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ObjectExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ObjectExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "properties"
},
"value": {
"type": "Identifier",
"name": "properties"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "properties"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Property"
},
"property": {
"type": "Identifier",
"name": "Property"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "properties"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "properties is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "properties"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "properties"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "properties"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "properties?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Property"
},
"property": {
"type": "Identifier",
"name": "Property"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ObjectExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isObjectExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ObjectExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isObjectExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ObjectExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ObjectExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ObjectExpression"
}
}
]
},
"Output": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Map"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Map"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Output"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "files"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Output"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Output"
},
{
"type": "Literal",
"value": "ion_Object"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "files"
},
"value": {
"type": "Identifier",
"name": "files"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "files"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "isMap"
}
},
"arguments": [
{
"type": "Identifier",
"name": "files"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "files is not a Map: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "files"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "files"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "files"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "files?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Map"
},
"property": {
"type": "Identifier",
"name": "Map"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
{
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Output"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isOutput"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Output"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isOutput"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Output"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Output"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Output"
}
}
]
},
"Parameter": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Variable"
}
}
],
"source": {
"type": "Literal",
"value": "./Variable"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Declaration"
}
}
],
"source": {
"type": "Literal",
"value": "./Declaration"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Boolean"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Boolean"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Parameter"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Variable"
},
"property": {
"type": "Identifier",
"name": "Variable"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "assignable"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "export"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Parameter"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Parameter"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Variable"
},
{
"type": "Literal",
"value": "Declaration"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "Identifier",
"name": "id"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "value"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "assignable"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "assignable"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": false,
"key": {
"type": "Identifier",
"name": "export"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "_export"
},
"right": {
"type": "Literal",
"value": false
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "id is not a Id: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a Expression | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "assignable is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "export is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "id"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "id"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "assignable"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "assignable"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "export"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "_export"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Parameter"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isParameter"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Parameter"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isParameter"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Parameter"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Parameter"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Parameter"
}
}
]
},
"Position": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Number"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Number"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Position"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "line"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Number"
},
"property": {
"type": "Identifier",
"name": "Number"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "column"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Number"
},
"property": {
"type": "Identifier",
"name": "Number"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Position"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Position"
},
{
"type": "Literal",
"value": "ion_Object"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "line",
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Number"
},
"property": {
"type": "Identifier",
"name": "Number"
}
}
},
{
"type": "Identifier",
"name": "column",
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Number"
},
"property": {
"type": "Identifier",
"name": "Number"
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Number"
},
"property": {
"type": "Identifier",
"name": "isNumber"
}
},
"arguments": [
{
"type": "Identifier",
"name": "line"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "line is not a Number: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "line"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Number"
},
"property": {
"type": "Identifier",
"name": "isNumber"
}
},
"arguments": [
{
"type": "Identifier",
"name": "column"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "column is not a Number: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "column"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "line"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "line"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "column"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "column"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isPosition"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Position"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isPosition"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Position"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Position"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Position"
}
}
]
},
"Property": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Property"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "key"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Property"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Property"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "key"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "key"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "Identifier",
"name": "value"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "key?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "key"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "key"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "key"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "key is not a Id | Expression | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "key"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "key"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "key"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "key?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Property"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isProperty"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Property"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isProperty"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Property"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Property"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Property"
}
}
]
},
"Reference": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Reference"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "name"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "Reference"
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Reference"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Reference"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Id"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Node"
},
{
"type": "Literal",
"value": "Typed"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "name"
},
"value": {
"type": "Identifier",
"name": "name"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "name"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "Reference"
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "isString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "name"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "name is not a String: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "name"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isReference"
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "name"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "name"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "name?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "Reference"
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Reference"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isReference"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Reference"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isReference"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Reference"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Reference"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Reference"
}
}
]
},
"ReturnStatement": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Statement"
}
}
],
"source": {
"type": "Literal",
"value": "./Statement"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ReturnStatement"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Statement"
},
"property": {
"type": "Identifier",
"name": "Statement"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ReturnStatement"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ReturnStatement"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Statement"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "Identifier",
"name": "value"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ReturnStatement"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isReturnStatement"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ReturnStatement"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isReturnStatement"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ReturnStatement"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ReturnStatement"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ReturnStatement"
}
}
]
},
"Scope": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Scope"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Scope"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Scope"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Scope"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isScope"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Scope"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isScope"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Scope"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Scope"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Scope"
}
}
]
},
"Statement": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Statement"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Statement"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Statement"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Statement"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isStatement"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Statement"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isStatement"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Statement"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Statement"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Statement"
}
}
]
},
"TemplateReference": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "TemplateReference"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "reference"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "arguments"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "TemplateReference"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "TemplateReference"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "reference"
},
"value": {
"type": "Identifier",
"name": "reference"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": false,
"key": {
"type": "Identifier",
"name": "arguments"
},
"value": {
"type": "Identifier",
"name": "_arguments"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "reference"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "arguments"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "reference"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "reference is not a Reference: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "reference"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_arguments"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "arguments is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_arguments"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "reference"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "reference"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "arguments"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "_arguments"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "reference?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "arguments?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "TemplateReference"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isTemplateReference"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "TemplateReference"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isTemplateReference"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "TemplateReference"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "TemplateReference"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "TemplateReference"
}
}
]
},
"ThisExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "ThisExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "ThisExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "ThisExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ThisExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isThisExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ThisExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isThisExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "ThisExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "ThisExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "ThisExpression"
}
}
]
},
"TypeDeclaration": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Variable"
}
}
],
"source": {
"type": "Literal",
"value": "./Variable"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Declaration"
}
}
],
"source": {
"type": "Literal",
"value": "./Declaration"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Boolean"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Boolean"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Array"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Array"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Parameter"
}
}
],
"source": {
"type": "Literal",
"value": "./Parameter"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "TypeDeclaration"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Variable"
},
"property": {
"type": "Identifier",
"name": "Variable"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "assignable"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "export"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "parameters"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "TypeDeclaration"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "TypeDeclaration"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Variable"
},
{
"type": "Literal",
"value": "Declaration"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "Identifier",
"name": "id"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "Identifier",
"name": "value"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "assignable"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "assignable"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": false,
"key": {
"type": "Identifier",
"name": "export"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "_export"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "parameters"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "parameters"
},
"right": {
"type": "ArrayExpression",
"elements": []
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "parameters?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "id is not a Id: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a TypeDefinition | Reference: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "assignable is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "export is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "isArray"
}
},
"arguments": [
{
"type": "Identifier",
"name": "parameters"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "parameters is not a Array: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "parameters"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "id"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "id"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "assignable"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "assignable"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "export"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "_export"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "parameters"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "parameters"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "parameters?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Array"
},
"property": {
"type": "Identifier",
"name": "Array"
},
"genericArguments": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Parameter"
},
"property": {
"type": "Identifier",
"name": "Parameter"
}
}
]
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "TypeDeclaration"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isTypeDeclaration"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "TypeDeclaration"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isTypeDeclaration"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "TypeDeclaration"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "TypeDeclaration"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "TypeDeclaration"
}
}
]
},
"TypeDefinition": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "TypeDefinition"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "TypeDefinition"
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "TypeDefinition"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "TypeDefinition"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "TypeDefinition"
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isTypeDefinition"
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "TypeDefinition"
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "TypeDefinition"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isTypeDefinition"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isTypeDefinition"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "TypeDefinition"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
]
},
"TypeExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "TypeExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "TypeExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "TypeExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "TypeDefinition"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "Identifier",
"name": "value"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "TypeExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isTypeExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "TypeExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isTypeExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "TypeExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "TypeExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "TypeExpression"
}
}
]
},
"Typed": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Typed"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Typed"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Typed"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isTyped"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Typed"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isTyped"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Typed"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Typed"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Typed"
}
}
]
},
"UnaryExpression": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "String"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/String"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "UnaryExpression"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "operator"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "argument"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "UnaryExpression"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "UnaryExpression"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Expression"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "operator"
},
"value": {
"type": "Identifier",
"name": "operator"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "argument"
},
"value": {
"type": "Identifier",
"name": "argument"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "operator"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "argument"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "isString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "operator"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "operator is not a String: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "operator"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "argument"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "argument is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "argument"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "operator"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "operator"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "argument"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "argument"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "operator?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "String"
},
"property": {
"type": "Identifier",
"name": "String"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "argument?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "UnaryExpression"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isUnaryExpression"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "UnaryExpression"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isUnaryExpression"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "UnaryExpression"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "UnaryExpression"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "UnaryExpression"
}
}
]
},
"Variable": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Boolean"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Boolean"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "Variable"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "assignable"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "Variable"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Variable"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "Identifier",
"name": "id"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "value"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "assignable"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "assignable"
},
"right": {
"type": "Literal",
"value": false
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "id is not a Id: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a Expression | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "assignable is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "id"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "id"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "assignable"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "assignable"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Variable"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isVariable"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Variable"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isVariable"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "Variable"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "Variable"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "Variable"
}
}
]
},
"VariableDeclaration": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Variable"
}
}
],
"source": {
"type": "Literal",
"value": "./Variable"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Declaration"
}
}
],
"source": {
"type": "Literal",
"value": "./Declaration"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Typed"
}
}
],
"source": {
"type": "Literal",
"value": "./Typed"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "TypeDefinition"
}
}
],
"source": {
"type": "Literal",
"value": "./TypeDefinition"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Reference"
}
}
],
"source": {
"type": "Literal",
"value": "./Reference"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Id"
}
}
],
"source": {
"type": "Literal",
"value": "./Id"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Boolean"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Boolean"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "VariableDeclaration"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Variable"
},
"property": {
"type": "Identifier",
"name": "Variable"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Declaration"
},
"property": {
"type": "Identifier",
"name": "Declaration"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Typed"
},
"property": {
"type": "Identifier",
"name": "Typed"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "type"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "value"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "assignable"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "export"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "virtual"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "VariableDeclaration"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "VariableDeclaration"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Variable"
},
{
"type": "Literal",
"value": "Declaration"
},
{
"type": "Literal",
"value": "Typed"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "type"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "type"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "Identifier",
"name": "id"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "value"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "value"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "assignable"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "assignable"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": false,
"key": {
"type": "Identifier",
"name": "export"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "_export"
},
"right": {
"type": "Literal",
"value": false
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "virtual"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "virtual"
},
"right": {
"type": "Literal",
"value": false
}
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "virtual?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "isTypeDefinition"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "isReference"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "type is not a TypeDefinition | Reference | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "type"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "isId"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "id is not a Id: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "id"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "value is not a Expression | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "assignable is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "assignable"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "export is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "_export"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "isBoolean"
}
},
"arguments": [
{
"type": "Identifier",
"name": "virtual"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "virtual is not a Boolean: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "virtual"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "type"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "type"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "id"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "id"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "value"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "assignable"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "assignable"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "export"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "_export"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "virtual"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "virtual"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "type?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "TypeDefinition"
},
"property": {
"type": "Identifier",
"name": "TypeDefinition"
}
},
"operator": "|",
"right": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Reference"
},
"property": {
"type": "Identifier",
"name": "Reference"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "id?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Id"
},
"property": {
"type": "Identifier",
"name": "Id"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "value?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "assignable?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "export?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "virtual?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Boolean"
},
"property": {
"type": "Identifier",
"name": "Boolean"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "VariableDeclaration"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isVariableDeclaration"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "VariableDeclaration"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isVariableDeclaration"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "VariableDeclaration"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "VariableDeclaration"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "VariableDeclaration"
}
}
]
},
"WhileStatement": {
"type": "Program",
"leadingComments": [
{
"value": "
This file was generated from ion source. Do not edit.
"
}
],
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "_Object"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Object"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Statement"
}
}
],
"source": {
"type": "Literal",
"value": "./Statement"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Node"
}
}
],
"source": {
"type": "Literal",
"value": "./Node"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Location"
}
}
],
"source": {
"type": "Literal",
"value": "./Location"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Null"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Null"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Expression"
}
}
],
"source": {
"type": "Literal",
"value": "./Expression"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "BlockStatement"
}
}
],
"source": {
"type": "Literal",
"value": "./BlockStatement"
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"local": {
"type": "Identifier",
"name": "Class"
}
}
],
"source": {
"type": "Literal",
"value": "./ion/Class"
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "ClassDeclaration",
"id": {
"type": "Identifier",
"name": "WhileStatement"
},
"implements": [
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "_Object"
},
"property": {
"type": "Identifier",
"name": "Object"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Statement"
},
"property": {
"type": "Identifier",
"name": "Statement"
}
},
{
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Node"
},
"property": {
"type": "Identifier",
"name": "Node"
}
}
],
"body": {
"type": "ClassBody",
"body": [
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "location"
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "test"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "body"
},
"tstype": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
},
"init": null
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "id"
},
"init": {
"type": "Literal",
"value": "WhileStatement"
}
}
]
},
{
"type": "VariableDeclaration",
"kind": "static readonly",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "implements"
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Set"
},
"arguments": [
{
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "WhileStatement"
},
{
"type": "Literal",
"value": "ion_Object"
},
{
"type": "Literal",
"value": "Statement"
},
{
"type": "Literal",
"value": "Node"
}
]
}
]
}
}
]
},
{
"type": "MethodDefinition",
"kind": "constructor",
"key": {
"type": "Identifier",
"name": "constructor"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "ObjectPattern",
"properties": [
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "location"
},
"value": {
"type": "AssignmentPattern",
"left": {
"type": "Identifier",
"name": "location"
},
"right": {
"type": "Literal",
"value": null
}
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "test"
},
"value": {
"type": "Identifier",
"name": "test"
}
},
{
"type": "Property",
"kind": "init",
"shorthand": true,
"key": {
"type": "Identifier",
"name": "body"
},
"value": {
"type": "Identifier",
"name": "body"
}
}
],
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "test"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "body"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "BinaryExpression",
"left": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "isLocation"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
},
"operator": "||",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "isNull"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "location is not a Location | Null: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "location"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "isExpression"
}
},
"arguments": [
{
"type": "Identifier",
"name": "test"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "test is not a Expression: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "test"
}
]
}
}
]
}
}
},
{
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "isBlockStatement"
}
},
"arguments": [
{
"type": "Identifier",
"name": "body"
}
]
}
},
"consequent": {
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error"
},
"arguments": [
{
"type": "BinaryExpression",
"left": {
"type": "Literal",
"value": "body is not a BlockStatement: "
},
"operator": "+",
"right": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "toString"
}
},
"arguments": [
{
"type": "Identifier",
"name": "body"
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "location"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "location"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "test"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "test"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "ThisExpression"
},
"property": {
"type": "Identifier",
"name": "body"
}
},
"operator": "=",
"right": {
"type": "Identifier",
"name": "body"
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Object"
},
"property": {
"type": "Identifier",
"name": "freeze"
}
},
"arguments": [
{
"type": "ThisExpression"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"key": {
"type": "Identifier",
"name": "patch"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "properties",
"tstype": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "location?"
},
"value": {
"type": "BinaryExpression",
"left": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Location"
},
"property": {
"type": "Identifier",
"name": "Location"
}
},
"operator": "|",
"right": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Null"
},
"property": {
"type": "Identifier",
"name": "Null"
}
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "test?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Expression"
},
"property": {
"type": "Identifier",
"name": "Expression"
}
}
},
{
"type": "Property",
"kind": "init",
"key": {
"type": "Identifier",
"name": "body?"
},
"value": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "BlockStatement"
},
"property": {
"type": "Identifier",
"name": "BlockStatement"
}
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "WhileStatement"
},
"arguments": [
{
"type": "ObjectExpression",
"properties": [
{
"type": "SpreadElement",
"argument": {
"type": "ThisExpression"
}
},
{
"type": "SpreadElement",
"argument": {
"type": "Identifier",
"name": "properties"
}
}
]
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"kind": "method",
"static": true,
"key": {
"type": "Identifier",
"name": "is"
},
"value": {
"type": "FunctionExpression",
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "isWhileStatement"
},
"arguments": [
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
},
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "WhileStatement"
}
}
}
}
]
}
}
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "isWhileStatement"
},
"params": [
{
"type": "Identifier",
"name": "value"
}
],
"tstype": {
"type": "BinaryExpression",
"left": {
"type": "Identifier",
"name": "value"
},
"operator": "is",
"right": {
"type": "Identifier",
"name": "WhileStatement"
}
},
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "Class"
},
"property": {
"type": "Identifier",
"name": "isInstance"
}
},
"arguments": [
{
"type": "Identifier",
"name": "WhileStatement"
},
{
"type": "Identifier",
"name": "value"
}
]
}
}
]
}
}
},
{
"type": "ExportDefaultDeclaration",
"declaration": {
"type": "Identifier",
"name": "WhileStatement"
}
}
]
}
}